home *** CD-ROM | disk | FTP | other *** search
- /* AmigaGuide Index creator for AMIS */
-
- OPTIONS RESULTS
- SIGNAL ON SYNTAX
- SIGNAL ON BREAK_C
-
- 'Query NAME'
- name=result
- 'Query POS'
- pos=result
- 'File NAME="'||name||'.index" NEW'
- 'AutoIndent OFF'
- 'Viewer NAME="AmigaGuide"'
- 'Insert TEXT="¶@node INDEX¶¶¶@endnode¶"'
- 'CursUp 2'
- 'SelectWindow NAME="'||name||'"'
- 'Query LINES'
- lines=result
- 'Cursup TOP'
- 'Graphics OFF'
- line=1
- 'GetLine'
- text=result
- do while line<=lines
- if upper(left(text,5))="@NODE" then
- do
- 'SelectWindow NAME="'||name||'.index"'
- parse var text '@node' test1 test2
- if test2="" then
- do
- test2=test1
- test1=left(test1,length(test1)-1)
- end
- test1=strip(strip(test1),,'"')
- test2=strip(strip(left(test2,length(test2)-1)),,'"')
- 'Insert TEXT=" @{*"'||test2||'*" link *"'||test1||'*"}¶"'
- 'SelectWindow NAME="'||name||'"'
- end
- line=line+1
- 'Goto LINE='||line
- 'GetLine'
- text=result
- end
- 'Goto POS='||pos
- 'Graphics ON'
- 'SelectWindow NAME="'||name||'.index"'
- 'CursUp TOP'
- exit
-
- SYNTAX:
- say "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
- exit
-
- BREAK_C:
- say "*** Break"
- exit
-